using System;
using Phoenix.Framework;

namespace Phoenix.Frames
{
    public interface IContentFrame : IDisposable
    {
        string Name { get; }
        NavigationRequest CurrentRequest { get; }
        void NavigateTo(NavigationRequest navigationRequest);
        void BeginOperation(InvokeActionRequest invokeRequest);
        void EndOperation(InvokeActionRequest invokeRequest);
        void RegisterChild(IContentFrame targetFrame);
        void DeactivateCurrentRequest();
        void ActivateCurrentRequest();
        void InitialiseHost(IPhoenixHost host);

        /// <summary>
        /// Used when there are bound or dynamic child frames, and a view needs to cleanup it's current children
        /// </summary>
        void InvalidateChildren();
        ChildFrameCollection ChildFrames { get; }
        IContentFrame ParentFrame { get; }
        void SetParent(IContentFrame parentFrame);
        event NavigationCompleteEvent NavigationComplete;
        event EventHandler ForegroundOperationStarted;
        event EventHandler ForegroundOperationComplete;
        void CurrentRequestClosing(RequestClosingEventArgs eventArgs);
    }
}